#include "lib.h"
using namespace std;

int main(int argc, char* argv[])
{
  dout.setLevel(DEBUG);

  Sort s1(0, 3, 10), s2(4, 2, 2), s3(10, 1, 1);

  blank() << s1 << " ; " << s2 << " ; " << s3 << endl;

  vector<Sort> vec;

  vec.push_back(s2);
  vec.push_back(s3);
  vec.push_back(s1);

  vector<Sort>::iterator Begin(vec.begin()), End(vec.end()), it;

  for (it = Begin; it != End; it++)
    blank() << *it << "  ";
  blank() << endl;

  sort(Begin, End);

  blank() << "Tri effectué :" << endl;

  for (it = Begin; it != End; it++)
    blank() << *it << "  ";
  blank() << endl;

  for (it = Begin; it != End - 1; it++)
    {
      if (*it > *(it + 1))
	blank() << *it << " > " << *(it + 1) << " ?  oui" << endl;
      else
	blank() << *it << " > " << *(it + 1) << " ? non" << endl;
    }

  for (it = Begin; it != End - 1; it++)
    {
      if (*it < *(it + 1))
	blank() << *it << " < " << *(it + 1) << " ?  oui" << endl;
      else
	blank() << *it << " < " << *(it + 1) << " ? non" << endl;
    }

  return 0;
}
